package com.hzw.saas.service.hpc.service.impl;

import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzw.saas.api.hpc.IHpcBalanceOrderService;
import com.hzw.saas.api.hpc.bo.HpcBalanceOrderBo;
import com.hzw.saas.common.util.MapperUtil;
import com.hzw.saas.service.hpc.mapper.HpcBalanceOrderMapper;
import com.hzw.saas.service.hpc.model.HpcBalanceOrder;
import org.springframework.stereotype.Service;

import java.util.Objects;

/**
 * <p>
 *   HPC充值记录
 * </p>
 *
 * @author sonam
 * @since 2021/5/31 17:02
 */
@Service("hpcBalanceOrderServiceImpl")
public class HpcBalanceOrderServiceImpl extends ServiceImpl<HpcBalanceOrderMapper, HpcBalanceOrder> implements IHpcBalanceOrderService, IService<HpcBalanceOrder> {

    @Override
    public void insert(HpcBalanceOrderBo hpcBalanceOrderBo) {
        if(Objects.isNull(hpcBalanceOrderBo)) return;
        this.save(MapperUtil.nf().map(hpcBalanceOrderBo, HpcBalanceOrder.class));
    }

}
